// 用于配置服务端与数据库的连接
const mongoose = require("mongoose");
const dbURI = "mongodb://localhost/rentalCar"; //  rentalCar是当前连接的数据库名称
//云数据库
//const dbURI = "mongodb+srv://root:root1234@cluster0-awtxo.azure.mongodb.net/rentalCar?authSource=admin&replicaSet=Cluster0-shard-0&readPreference=primary&appname=MongoDB%20Compass&ssl=true";
mongoose.connect(dbURI, { useNewUrlParser: true, useUnifiedTopology: true });
mongoose.connection.on("connected", function () {
	console.log("mongoose 成功连接 mongodb 数据库：" + dbURI);
});
require("./models/adminModel");
require("./models/userModel");
require("./models/carModel");
require("./models/orderModel");
require("./models/reviewsModel");
